package com.siam.package_promotion.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.siam.package_common.entity.BasicResult;
import com.siam.package_promotion.entity.DeductionMemberRelation;

@FeignClient(value = "promotion-siam")
public interface DeductionMemberRelationFeignApi {
		
	@PostMapping(value = "/api/deductionMemberRelation/insertSelective")
    BasicResult insertSelective(@RequestBody DeductionMemberRelation memberRelation);
	
	@PostMapping(value = "/api/deductionMemberRelation/getCountsByMemberId")
	BasicResult<Integer> getCountsByMemberId(@RequestParam("memberId")Integer memberId,@RequestParam("isUsed")Integer isUsed);
	
	@PostMapping(value = "/api/deductionMemberRelation/selectNotUsedByDeductionMemberRelationId")
	BasicResult<DeductionMemberRelation> selectNotUsedByDeductionMemberRelationId(@RequestParam("deductionMemberRelationId")Integer deductionMemberRelationId);
	
	/**
     * 使用抵扣劵
     */
    @PostMapping(value = "/api/deductionMemberRelation/updateDeductionUsed")
	BasicResult updateDeductionUsed(@RequestParam("id") Integer id, @RequestParam("isUsed") Boolean isUsed);
}
